extends "ChaInfo.gd"

func _extInit():
	._extInit()
	type = sys.CharaClass.SIREN
	setCamp("塞壬")
	addSkill("单次受伤量不超过最大生命值的30%，每{cd}秒弱驱散自身负面效果", "塞壬", "siren", 6)

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "siren":
		weakDispel(self, true)

func _onHurt(atkInfo):
	._onHurt(atkInfo)
	if atkInfo.hurtVal > att.maxHp * 0.3:
		atkInfo.hurtVal = att.maxHp * 0.3

#舰载机onDeath时触发此函数
func onSummDeath(atkInfo):
	pass

#换算航空伤害
func getAirDmg(baseNum):
	return baseNum * (1 + att.air*0.01)

#执行extInit后执行此函数
func postInit():
	var p = sys.main.getStep() * 0.005 + 1
	if lv == 2:
		attInfox.maxHp *= 1.5 * p
		attInfox.def += 10 * p
		attInfox.dod += 10 * p
		attInfox.air *= 1.25 * p
		attInfox.atk *= 1.25 * p
		attInfox.mgiAtk *= 1.25 * p
	elif lv == 3:
		attInfox.maxHp *= 2 * p
		attInfox.def += 20 * p
		attInfox.dod += 20 * p
		attInfox.air *= 1.75 * p
		attInfox.atk *= 1.75 * p
		attInfox.mgiAtk *= 1.75 * p
	elif lv == 4:
		attInfox.maxHp *= 3 * p
		attInfox.def += 40 * p
		attInfox.dod += 40 * p
		attInfox.air *= 2.25 * p
		attInfox.atk *= 2.25 * p
		attInfox.mgiAtk *= 2.25 * p

	upAtt()	

	if mainFlag and mainName == "":
		mainDmg = 80
		mainName = "[color=#F8F8FF][默认]152mm连装炮[/color]"
	if torpFlag and torpName == "":
		torpDmg = 220
		torpName = "[color=#F8F8FF][默认]三联装533mm鱼雷[/color]"
		torpCd = 5